Gadgetjack's Small 25 line program (dbox' wicked mod)

Charlie Veniotย 15th November 2022 at 8:00pm
' BAM port of a QBJS program by dbox (https://qb64phoenix.com/forum/showthread.php?tid=1122&pid=9901#pid9901)
' dbox' program based on a program by Gadgetjack (https://qb64phoenix.com/forum/showthread.php?tid=1122&pid=9857#pid9857)
' And Gadgetjack's program is a port of an MMBASIC program to QB64.
' BASIC rocks !  And sure makes it easy to stand tall on the shoulders of others !
'
' This BASIC Anywhere Machine program by Charlie Veniot (changes/additions made to dbox' program noted below with a "๐ŸŸ ")


Screen 18 ' ๐ŸŸ  in BAM, screen mode 12 only supports 16 colors; so had to switch to screen mode 18 for rgb colors.
pi = 3.1415
n = 200
r = (2 * pi) / 100
x = 0
v = 0
t = 0
sz = 200
s = 0
scrw = 640: scrh = 480
sw = scrw / sz: sh = scrh / sz
offset = scrh / 4.5
Do
    Cls
    For i = 50 To n
        c = _RGB32(Int(Rnd * 200) + 55, Int(Rnd * 200) + 55, Int(Rnd * 200) + 55)
        For j = 50 To n
            u = Sin(i + v) + Sin(r * i + x)
            v = Cos(i + v) + Cos(r * i + x)
            x = u + t
            q = scrw / 2 + u * offset
            a = scrh / 2 + v * offset
            Pset (q, a), c
            lastq = q: lasta = a
        Next j
    Next i
    t = t + .001
    _Display
    _Limit 30
Loop